﻿Public Class PaintbearMenuItem
    Inherits MenuItem

    Private Sub PaintbearMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
        Try
            Dim bmp As New Bitmap(Me.Text)
            frmMain.drawBox.BackgroundImage = bmp
            frmMain.drawBox.Height = bmp.Width
            frmMain.drawBox.Width = bmp.Width
            frmMain.mainPanel.Width = frmMain.drawBox.Width
            frmMain.mainPanel.Height = frmMain.drawBox.Height
            frmMain.Text = "[" & Me.Text & "]" & " - Paintbear 0.9(bt09t)"
            frmMain.MenuItem15.Visible = False
            frmMain.statusLbl.Text = Me.Text
            frmMain.drawBox.BackgroundImageLayout = ImageLayout.None
        Catch
            MsgBox("Directory or file not found !", MsgBoxStyle.Critical)
        End Try

    End Sub
End Class
